<?php
class Sosweb_View_Helper_MessageInfo
{
	public function messageInfo($baseUrl, $message)
	{
		$html = null;
		
		if ($message != null):
			$mesage_text = (is_array($message) ? $message['text'] : $message);
			$mesage_link = (is_array($message) ? $message['link'] : null);
			$mesage_link_tile = (is_array($message) ? $message['link_title'] : null);
			
			$html =
			    '<div class="messageBox"> '.
				' <table class="fullW fullH"> '.
				'  <tr> '.
				'   <td class="messageText"> '.
				$mesage_text.
				'   </td> ';
				
			if ($mesage_link != null):
				$html .=	
					'   <td class="messageLink"> '.
					' 	 <a class="messageLink" href="'.$mesage_link.'"/>'.$mesage_link_tile.'</a> '.			
					'   </td> ';
			endif;

			$html .=
				'   <td class="messageLink"> '.
				' 	 <a class="messageLink" href="javascript: closeMessage();"/>Zamknij</a> '.			
				'   </td> '.
				'  </tr> '.
				' </table> '.
				'</div> ';
		endif;

		return $html;
	}
}